package com.hisense.hiioc.hismartplate.robot.engine;


import java.util.ArrayList;
import java.util.List;

/**
 * @Auther:biexiande@hisense.com
 * @date:2018/7/3 15:15
 * @des
 */
public class HandlerChainBuilder {
    public static IInputHander buildChains(){
        List<AbstractInputHandler> chains  =new ArrayList<>();
        chains.add(new DialogInputHandler());
        chains.add(new AIMLInputHandler());
        chains.add(new DuerosInputHandler());
        for (int i = 0; i < chains.size() ; i++) {
            if(i<chains.size()-1){
                chains.get(i).setNextHandler(chains.get(i+1));
            }
        }
        return chains.get(0);
    }
}